Skip to content

Register set-available-attachment-versions extension - #195

Open
JakeSCahill wants to merge 2 commits into
mainfrom
feat/register-available-attachment-versions
Open

Register set-available-attachment-versions extension#195
JakeSCahill wants to merge 2 commits into
mainfrom
feat/register-available-attachment-versions

Conversation

@JakeSCahill

Copy link
Copy Markdown
Contributor

What

Registers the new set-available-attachment-versions Antora extension (redpanda-data/docs-extensions-and-macros#224) in all three playbooks.

Why

The site's properties-json-url / connect-json-url meta tags are built from release-tracking attributes that drift ahead of the generated JSON attachments, producing our top 404s (~25k requests/day) and silently breaking property tooltips on streaming/current. The extension sets available-properties-tag / available-connect-version from what actually exists in the catalog, and disables property tooltips on old streaming versions that have no properties JSON at all.

⚠️ Merge order

Draft until a @redpanda-data/docs-extensions-and-macros release containing #224 is published — the require path doesn't exist in the currently installed package, so merging early breaks the build. After the release, re-run npm update @redpanda-data/docs-extensions-and-macros (pin is ^5.0.0) and mark ready.

Related: docs-ui negative caching (redpanda-data/docs-ui#407), props v26.1.14 and connect 4.102.0 regeneration PRs (already open).

🤖 Generated with Claude Code

Sets available-properties-tag / available-connect-version from what is
actually in the content catalog so the UI's properties-json-url and
connect-json-url meta tags never reference a JSON attachment that was
not generated (top source of 404s: ~25k requests/day).

Requires a docs-extensions-and-macros release containing
redpanda-data/docs-extensions-and-macros#224.

Co-Authored-By: Claude Fable 5 <[email protected]>
@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for redpanda-documentation failed. Why did it fail? →

Name Link
🔨 Latest commit 897815d
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-documentation/deploys/6a70c620920e140008ff5ea3

@JakeSCahill
JakeSCahill marked this pull request as ready for review August 3, 2026 10:29
@JakeSCahill
JakeSCahill requested a review from a team as a code owner August 3, 2026 10:29
@micheleRP

Copy link
Copy Markdown
Contributor

Reviewed — the change itself is correct, but flagging that it isn't mergeable yet so it doesn't get picked up by mistake.

The registration looks right. The extension is added to all three playbooks (antora-playbook.yml, local-antora-playbook.yml, preview-antora-playbook.yml) with an identical explanatory comment, so preview and local builds behave like production. I reviewed redpanda-data/docs-extensions-and-macros#224 alongside this and verified the chain end to end against docs-ui: head-meta.hbs already prefers available-properties-tag / available-connect-version with nothing setting them, and page-disable-property-tooltips really does prevent the fetch (19-property-tooltips.js:451 returns before any request).

Not mergeable until #224 ships to npm. Confirming what your merge-order note says, since the PR isn't in draft state:

$ node -p "require('./node_modules/@redpanda-data/docs-extensions-and-macros/package.json').version"
4.1.0

$ ls node_modules/@redpanda-data/docs-extensions-and-macros/extensions/set-available-attachment-versions.js
ls: ...: No such file or directory

The require path doesn't exist in the installed package, so merging now fails the build. Needs a published release containing #224, then npm update, before this goes in.

One ordering note carried over from #224. In all three playbooks this sits before version-fetcher/set-latest-version (line 368 vs 398 in antora-playbook.yml), and both hook contentClassified, which Antora dispatches in registration order. That's fine today because every antora.yml pins a latest-redpanda-tag fallback, which is what the extension's tooltip-disable branch gates on. It's only a problem if a version branch ever drops that fallback — worth resolving in #224 rather than here.

No changes needed on this PR beyond the merge gate.

Review findings on this PR and dem#224:

- The lockfile resolved 5.0.0, which predates the extension file, so
  merging would have broken the build. doc-tools 5.3.5 (published
  today) ships it; floor and lockfile bumped, install verified to
  contain extensions/set-available-attachment-versions.js.
- Registration moved after version-fetcher/set-latest-version in all
  three playbooks: both hook contentClassified and Antora dispatches in
  registration order, and the tooltip-disable branch reads
  latest-redpanda-tag. Registering first worked only because every
  antora.yml pins a fallback tag.
@JakeSCahill

Copy link
Copy Markdown
Contributor Author

Unblocked and hardened: doc-tools 5.3.5 with the extension is on npm, so this now carries the package.json floor + lockfile bump (install verified to contain the extension file), and registration moved after version-fetcher/set-latest-version in all three playbooks per the ordering fragility noted on dem#224. Ready for a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants